.atk-main-editor {
  $editor-padding: 10px;
  position: relative;
  overflow: hidden;
  background: var(--at-color-bg);
  border: 1px solid var(--at-color-border);
  border-radius: $block-radius;
  margin-bottom: 10px;

  @media only screen and (max-width: 768px) {
    margin-bottom: 7px;
  }

  &.editor-traveling {
    margin-top: 5px;
    margin-bottom: 10px;
  }

  & > .atk-header {
    display: flex;
    flex-direction: row;
    padding: 10px 14px 0;

    input {
      flex: 1;
      width: 100%;
      font-size: 14px;
      background: transparent;
      border: 1px solid transparent;
      border-radius: calc($block-radius / 2);
      padding: 6px 5px;
      resize: none;
      outline: none;

      border-bottom: 1px solid var(--at-color-border);

      &:not(:last-child) {
        margin-right: 12px;
      }
    }
  }

  & > .atk-textarea-wrap {
    position: relative;

    & > .atk-textarea {
      display: block;
      overflow: hidden;
      color: var(--at-color-font);
      font-size: 15px;
      background-color: var(--at-color-bg);
      border: 2px solid transparent;
      border-radius: calc($block-radius / 2);
      width: 100%;
      min-height: 120px;
      margin-top: 2px;
      padding: 10px 20px;
      resize: none;
      word-wrap: break-word;
      outline: none;
    }

    & > .atk-comment-closed {
      pointer-events: none;
      color: var(--at-color-meta);
      font-size: 12px;
      background-color: var(--at-color-bg);
      border-top: 1px solid var(--at-color-border);
      padding: 5px 15px;
      margin-top: 10px;
      // background: repeating-linear-gradient(145deg, #f2f2f2, #f2f2f2 15px, #fff 0, #fff 30px);
    }
  }

  & > .atk-plug-panel-wrap {
    position: relative;
    height: 180px;
    width: 100%;
    overflow: hidden;
    border-top: 1px solid var(--at-color-border);
    animation: 0.3s both atkFadeIn;
    transition: 0.2s height ease-in-out;
  }

  & > .atk-bottom {
    display: flex;
    flex-direction: row;
    row-gap: 5px;
    justify-content: space-between;
    padding: 5px;
    flex-wrap: wrap;

    & > .atk-item {
      display: flex;
      flex-direction: row;
      align-items: center;
    }

    & > .atk-bottom-left {
      & > .atk-state-wrap {
        margin-right: 5px;
      }

      & > .atk-plug-btn-wrap {
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        row-gap: 5px;
      }
    }

    .atk-plug-btn {
      display: flex;
      justify-content: center;
      place-items: center;
      padding: 0 10px;
      line-height: 30px;
      height: 30px;
      cursor: pointer;
      color: var(--at-color-grey);
      font-size: $font-size;
      user-select: none;
      border-radius: calc($block-radius / 2);
      word-break: keep-all;

      &:not(:last-child) {
        margin-right: 5px;
      }

      &:hover {
        background: var(--at-color-bg-grey);
      }

      &.active {
        color: var(--at-color-main);

        svg.markdown path {
          fill: var(--at-color-main);
        }
      }

      i {
        display: flex;
        justify-content: center;
        place-items: center;
        color: var(--at-color-grey);

        &:not(:first-child) {
          margin-left: 4px;
        }
      }
    }

    .atk-state-btn {
      z-index: 2;
      height: 30px;
      padding: 0 0 0 10px;
      font-size: 14px;
      position: relative;
      display: flex;
      flex-direction: row;
      justify-content: center;
      place-items: center;
      background: var(--at-color-bg-grey-transl);
      cursor: pointer;
      overflow: hidden;
      border-radius: calc($block-radius / 2);

      &:hover {
        .atk-cancel {
          background: rgba(0, 0, 0, 4%);
        }
      }

      @media only screen and (max-width: 768px) {
        padding: 0;

        .atk-text-wrap {
          display: none;
        }
      }

      .atk-text-wrap {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 0 8px 0 2px;
        max-width: 8em;
      }

      .atk-cancel {
        display: flex;
        justify-content: center;
        place-items: center;
        padding: 0 10px;
        font-weight: 700;
        height: 100%;
        background: rgba(0, 0, 0, 2%);
      }
    }

    .atk-send-btn {
      background: var(--at-color-main);
      color: #fff;
      font-size: $font-size;
      border: none;
      margin: 0;
      height: 30px;
      min-width: 7.3em;
      cursor: pointer;
      transition: opacity 0.3s ease-in-out;
      outline: none;
      border-radius: calc($block-radius / 2);

      @media only screen and (max-width: 768px) {
        min-width: 6em;
      }

      &:active {
        opacity: 0.9;
      }
    }
  }

  & > .atk-notify-wrap {
    z-index: 3;
    position: absolute;
    right: -2px;
    bottom: 40px;
    width: 225px;
    opacity: 0.83;
  }
}
